#pragma once

#include <objbase.h>
#include <comutil.h>

namespace ExcelLibrary
{
	interface IColumn : IUnknown
	{
		virtual VARTYPE GetType() = 0;
		virtual bool IsNull() = 0;
		virtual int GetIntValue() = 0;
		virtual float GetFloatValue() = 0;
		virtual const wchar_t* GetStringValue() = 0;
		virtual _variant_t GetVariant() = 0;
	};

	interface ISheet : IUnknown
	{
		virtual bool EndOfRow() = 0;
		virtual bool MoveNextRow() = 0;
		virtual bool MovePrevRow() = 0;
		virtual bool MoveRow(unsigned long ulRowPos) = 0;
		virtual unsigned long GetRowCount() = 0;
		virtual unsigned long GetColumnCount() = 0;
		virtual IColumn* GetColumn(unsigned long ulColumnPos) = 0;
	};

	interface IFile : IUnknown
	{
		virtual ISheet* LoadSheet(const wchar_t* pSheetName) = 0;
		virtual const wchar_t* GetSheetName(unsigned long ulSheetIdx) = 0;
		virtual unsigned long GetSheetCount() = 0;
	};

	IFile* __stdcall OpenFile(const wchar_t* pFileName);
}